/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package GUI;

import DAO.Fechas;
import DAO.ValidarRutDAO;
import DAO.garantiasDAO;
import DTO.ReporteInformeTotalGarantiaAutoDTO;
import DTO.ReporteInformeTotalGarantiaCDPDTO;
import DTO.ReporteInformeTotalGarantiaDTO;
import DTO.ReporteInformeTotalGarantiaWarrantDTO;
import DTO.garantiaAutomotrizDTO;
import DTO.garantiaHipotecariaDTO;
import DTO.garantiaWarrantsDTO;
import DTO.garantiaCdpOtrosDTO;
import DTO.usuarioDTO;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import javax.swing.table.DefaultTableModel;
import javax.swing.table.TableColumnModel;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.JasperReport;
import net.sf.jasperreports.engine.data.JRBeanCollectionDataSource;
import net.sf.jasperreports.swing.JRViewer;

/**
 *
 * @author Luis Olave 10
 */
public class InformeTotalGtia extends javax.swing.JFrame {

   garantiasDAO garaHipo = new garantiasDAO();
   garantiasDAO garaAuto = new garantiasDAO();
   garantiasDAO garaCdp = new garantiasDAO();
   garantiasDAO garaWarra = new garantiasDAO();
   usuarioDTO user;
   
    public InformeTotalGtia(usuarioDTO user) {
        initComponents();
        this.user = user;
        this.chkRutInforme.setSelected(true);
        this.chkInformeAuto.setSelected(true);
        this.chkRutInfoWarra.setSelected(true);
        this.chkRutInformeCDP.setSelected(true);
        this.chkRutInfoWarra.setSelected(true);
        this.chkRutInformeCDP.setVisible(true);
        jPanelBuscarTodasLasGarantiasCDP.setVisible(false);
        this.jPanelBuscarTodasLasGarantiasWarrant.setVisible(false);
        this.jPanelBuscarTodasLasGarantiasAutomotriz.setVisible(false);
        this.jPanelBuscarTodasHipotecarias.setVisible(false);
        this.pnlIngreseRutGarante17.setVisible(false);
        this.pnlIngreseRutGarante16.setVisible(false);
        this.pnlIngreseRutGarante15.setVisible(false);
        this.pnlIngreseRutGarante14.setVisible(false);
        this.setDefaultCloseOperation(this.EXIT_ON_CLOSE);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        buttonGroup3 = new javax.swing.ButtonGroup();
        buttonGroup4 = new javax.swing.ButtonGroup();
        jLabel2 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jTabbedPane2 = new javax.swing.JTabbedPane();
        jPanel2 = new javax.swing.JPanel();
        pnlIngreseRutGarante = new javax.swing.JPanel();
        txtRutInforme = new javax.swing.JTextField();
        btnRutInforme = new javax.swing.JButton();
        chkRutInforme = new javax.swing.JCheckBox();
        chkFechaInforme = new javax.swing.JCheckBox();
        pnlIngreseRutGarante17 = new javax.swing.JPanel();
        jLabel41 = new javax.swing.JLabel();
        btnFechaInforme = new javax.swing.JButton();
        jLabel17 = new javax.swing.JLabel();
        jcDesdeInforme = new com.toedter.calendar.JDateChooser();
        jcHastaInforme = new com.toedter.calendar.JDateChooser();
        jScrollPane2 = new javax.swing.JScrollPane();
        jTInformeHipo = new javax.swing.JTable();
        btnVolv = new javax.swing.JButton();
        chkBuscarTodasLasGarantiasHipotecarias = new javax.swing.JCheckBox();
        jPanelBuscarTodasHipotecarias = new javax.swing.JPanel();
        btnBuscarTodasLasGarantiasHipotecaria = new javax.swing.JButton();
        btnInformeGarantiasHipo = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jPanel20 = new javax.swing.JPanel();
        pnlIngreseRutGarante8 = new javax.swing.JPanel();
        txtRutInformeAuto = new javax.swing.JTextField();
        btnBuscarRutAuto = new javax.swing.JButton();
        chkInformeAuto = new javax.swing.JCheckBox();
        chkFechaInformeAuto = new javax.swing.JCheckBox();
        pnlIngreseRutGarante16 = new javax.swing.JPanel();
        jLabel40 = new javax.swing.JLabel();
        btnFechaInformeAuto = new javax.swing.JButton();
        jLabel16 = new javax.swing.JLabel();
        jcDesdeInformeAuto = new com.toedter.calendar.JDateChooser();
        jcHastaInformeAuto = new com.toedter.calendar.JDateChooser();
        jScrollPane12 = new javax.swing.JScrollPane();
        jTInformeAuto = new javax.swing.JTable();
        btnVolver2 = new javax.swing.JButton();
        jPanelBuscarTodasLasGarantiasAutomotriz = new javax.swing.JPanel();
        btnBuscarTodasLasGarantiasAutomotriz = new javax.swing.JButton();
        chkBuscarTodasLasGarantiasAutomotriz = new javax.swing.JCheckBox();
        btnImprimirInformeGarantiaAuto = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        jPanel18 = new javax.swing.JPanel();
        pnlIngreseRutGarante7 = new javax.swing.JPanel();
        txtRutInformeWarra = new javax.swing.JTextField();
        btnRutInformeWarra = new javax.swing.JButton();
        chkRutInfoWarra = new javax.swing.JCheckBox();
        chkFechaInformeWarra = new javax.swing.JCheckBox();
        pnlIngreseRutGarante15 = new javax.swing.JPanel();
        jLabel39 = new javax.swing.JLabel();
        btnFechaInformeWarra = new javax.swing.JButton();
        jLabel15 = new javax.swing.JLabel();
        jcDesdeInformeWarra = new com.toedter.calendar.JDateChooser();
        jcHastaInformeWarra = new com.toedter.calendar.JDateChooser();
        jScrollPane13 = new javax.swing.JScrollPane();
        jTInformeWarra = new javax.swing.JTable();
        btnVolver3 = new javax.swing.JButton();
        jPanelBuscarTodasLasGarantiasWarrant = new javax.swing.JPanel();
        btnBuscarTodasLasGarantiasWarrant = new javax.swing.JButton();
        chkBuscarTodasLasGarantiasWarrant = new javax.swing.JCheckBox();
        btnImprimirInformeGarantiaWarra = new javax.swing.JButton();
        jPanel9 = new javax.swing.JPanel();
        jPanel16 = new javax.swing.JPanel();
        pnlIngreseRutGarante6 = new javax.swing.JPanel();
        txtRutInformeCDP = new javax.swing.JTextField();
        btnRutInformeCDP = new javax.swing.JButton();
        chkRutInformeCDP = new javax.swing.JCheckBox();
        chkFechaInformeCDP = new javax.swing.JCheckBox();
        pnlIngreseRutGarante14 = new javax.swing.JPanel();
        jLabel38 = new javax.swing.JLabel();
        btnFechaInformeCDP = new javax.swing.JButton();
        jLabel14 = new javax.swing.JLabel();
        jcDesdeInformeCDP = new com.toedter.calendar.JDateChooser();
        jcHastaInformeCDP = new com.toedter.calendar.JDateChooser();
        jScrollPane1 = new javax.swing.JScrollPane();
        jtableInformeCdp = new javax.swing.JTable();
        btnVolver1 = new javax.swing.JButton();
        jPanelBuscarTodasLasGarantiasCDP = new javax.swing.JPanel();
        btnBuscarTodasLasGarantiasCDP = new javax.swing.JButton();
        chkBuscarTodasLasGarantiasCDP = new javax.swing.JCheckBox();
        btnImprimirInformeGarantiaCDP = new javax.swing.JButton();
        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("INFORME TOTAL GARANTÍA");
        setResizable(false);

        jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/IMAGE/logo.JPG"))); // NOI18N

        jLabel4.setFont(new java.awt.Font("Century Gothic", 1, 18)); // NOI18N
        jLabel4.setText("INFORME DE GARANTÍAS");

        jTabbedPane2.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N

        pnlIngreseRutGarante.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE RUT", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnRutInforme.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnRutInforme.setText("BUSCAR");
        btnRutInforme.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRutInformeActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlIngreseRutGaranteLayout = new javax.swing.GroupLayout(pnlIngreseRutGarante);
        pnlIngreseRutGarante.setLayout(pnlIngreseRutGaranteLayout);
        pnlIngreseRutGaranteLayout.setHorizontalGroup(
            pnlIngreseRutGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGaranteLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlIngreseRutGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtRutInforme)
                    .addComponent(btnRutInforme, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlIngreseRutGaranteLayout.setVerticalGroup(
            pnlIngreseRutGaranteLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGaranteLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(txtRutInforme, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnRutInforme))
        );

        buttonGroup1.add(chkRutInforme);
        chkRutInforme.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkRutInforme.setText("BUSCAR POR RUT");
        chkRutInforme.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkRutInformeActionPerformed(evt);
            }
        });

        buttonGroup1.add(chkFechaInforme);
        chkFechaInforme.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkFechaInforme.setText("BUSCAR POR FECHA");
        chkFechaInforme.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkFechaInformeActionPerformed(evt);
            }
        });

        pnlIngreseRutGarante17.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE FECHAS", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel41.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel41.setText("DESDE");

        btnFechaInforme.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnFechaInforme.setText("BUSCAR");
        btnFechaInforme.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFechaInformeActionPerformed(evt);
            }
        });

        jLabel17.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel17.setText("HASTA");

        jcDesdeInforme.setDateFormatString("d-M-yyyy");

        jcHastaInforme.setDateFormatString("d-M-yyyy");

        javax.swing.GroupLayout pnlIngreseRutGarante17Layout = new javax.swing.GroupLayout(pnlIngreseRutGarante17);
        pnlIngreseRutGarante17.setLayout(pnlIngreseRutGarante17Layout);
        pnlIngreseRutGarante17Layout.setHorizontalGroup(
            pnlIngreseRutGarante17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGarante17Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlIngreseRutGarante17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel41)
                    .addComponent(jLabel17))
                .addGap(18, 18, 18)
                .addGroup(pnlIngreseRutGarante17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jcDesdeInforme, javax.swing.GroupLayout.DEFAULT_SIZE, 144, Short.MAX_VALUE)
                    .addComponent(jcHastaInforme, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnFechaInforme, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pnlIngreseRutGarante17Layout.setVerticalGroup(
            pnlIngreseRutGarante17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGarante17Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlIngreseRutGarante17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel41)
                    .addComponent(jcDesdeInforme, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlIngreseRutGarante17Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel17)
                    .addComponent(jcHastaInforme, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(13, 13, 13))
            .addGroup(pnlIngreseRutGarante17Layout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addComponent(btnFechaInforme)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jTInformeHipo.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jTInformeHipo.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "N° FOLIO", "RUT", "AP. PATERNO", "AP. MATERNO", "NOMBRE", "SUCURSAL", "COBERTURA", "SUPERFICIE", "REGISTRO CBR", "ROL SII", "FECHA CREACIÓN", "MONEDA", "TIPO CONSTRUCCIÓN", "COMUNA", "ESTADO CONTRI.", "MTS. CONSTRUIDOS", "FECHA EXTINCIÓN", "ESTADO GARANTIA"
            }
        ));
        jTInformeHipo.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        jTInformeHipo.getTableHeader().setResizingAllowed(false);
        jTInformeHipo.getTableHeader().setReorderingAllowed(false);
        jScrollPane2.setViewportView(jTInformeHipo);
        jTInformeHipo.getColumnModel().getColumn(0).setPreferredWidth(100);
        jTInformeHipo.getColumnModel().getColumn(1).setPreferredWidth(100);
        jTInformeHipo.getColumnModel().getColumn(2).setPreferredWidth(100);
        jTInformeHipo.getColumnModel().getColumn(3).setPreferredWidth(100);
        jTInformeHipo.getColumnModel().getColumn(4).setPreferredWidth(70);
        jTInformeHipo.getColumnModel().getColumn(5).setPreferredWidth(100);
        jTInformeHipo.getColumnModel().getColumn(6).setPreferredWidth(100);
        jTInformeHipo.getColumnModel().getColumn(7).setPreferredWidth(100);
        jTInformeHipo.getColumnModel().getColumn(8).setPreferredWidth(100);
        jTInformeHipo.getColumnModel().getColumn(9).setPreferredWidth(100);
        jTInformeHipo.getColumnModel().getColumn(10).setPreferredWidth(120);
        jTInformeHipo.getColumnModel().getColumn(11).setPreferredWidth(100);
        jTInformeHipo.getColumnModel().getColumn(12).setPreferredWidth(130);
        jTInformeHipo.getColumnModel().getColumn(13).setPreferredWidth(100);
        jTInformeHipo.getColumnModel().getColumn(14).setPreferredWidth(100);
        jTInformeHipo.getColumnModel().getColumn(15).setPreferredWidth(120);
        jTInformeHipo.getColumnModel().getColumn(16).setPreferredWidth(120);

        btnVolv.setText("VOLVER");
        btnVolv.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVolvActionPerformed(evt);
            }
        });

        buttonGroup1.add(chkBuscarTodasLasGarantiasHipotecarias);
        chkBuscarTodasLasGarantiasHipotecarias.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkBuscarTodasLasGarantiasHipotecarias.setText("BUSCAR TODAS LAS GARANTÍAS");
        chkBuscarTodasLasGarantiasHipotecarias.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkBuscarTodasLasGarantiasHipotecariasActionPerformed(evt);
            }
        });

        jPanelBuscarTodasHipotecarias.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "BUSCAR TODAS LAS GARANTÍAS", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnBuscarTodasLasGarantiasHipotecaria.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarTodasLasGarantiasHipotecaria.setText("BUSCAR");
        btnBuscarTodasLasGarantiasHipotecaria.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarTodasLasGarantiasHipotecariaActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelBuscarTodasHipotecariasLayout = new javax.swing.GroupLayout(jPanelBuscarTodasHipotecarias);
        jPanelBuscarTodasHipotecarias.setLayout(jPanelBuscarTodasHipotecariasLayout);
        jPanelBuscarTodasHipotecariasLayout.setHorizontalGroup(
            jPanelBuscarTodasHipotecariasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelBuscarTodasHipotecariasLayout.createSequentialGroup()
                .addGap(31, 31, 31)
                .addComponent(btnBuscarTodasLasGarantiasHipotecaria, javax.swing.GroupLayout.PREFERRED_SIZE, 112, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(44, Short.MAX_VALUE))
        );
        jPanelBuscarTodasHipotecariasLayout.setVerticalGroup(
            jPanelBuscarTodasHipotecariasLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelBuscarTodasHipotecariasLayout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addComponent(btnBuscarTodasLasGarantiasHipotecaria)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        btnInformeGarantiasHipo.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N
        btnInformeGarantiasHipo.setText("IMPRIMIR");
        btnInformeGarantiasHipo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnInformeGarantiasHipoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGap(389, 389, 389)
                        .addComponent(btnInformeGarantiasHipo, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btnVolv))
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel2Layout.createSequentialGroup()
                                .addComponent(chkRutInforme)
                                .addGap(132, 132, 132)
                                .addComponent(chkFechaInforme)
                                .addGap(152, 152, 152))
                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                                .addComponent(pnlIngreseRutGarante, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(pnlIngreseRutGarante17, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(34, 34, 34)))
                        .addGap(15, 15, 15)
                        .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(jPanelBuscarTodasHipotecarias, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkBuscarTodasLasGarantiasHipotecarias)))
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 772, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(17, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(chkFechaInforme)
                    .addComponent(chkRutInforme)
                    .addComponent(chkBuscarTodasLasGarantiasHipotecarias))
                .addGap(18, 18, 18)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel2Layout.createSequentialGroup()
                        .addComponent(pnlIngreseRutGarante17, javax.swing.GroupLayout.PREFERRED_SIZE, 85, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addComponent(pnlIngreseRutGarante, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelBuscarTodasHipotecarias, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 293, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnVolv)
                    .addComponent(btnInformeGarantiasHipo))
                .addGap(141, 141, 141))
        );

        jTabbedPane2.addTab("HIPOTECARÍA", jPanel2);

        pnlIngreseRutGarante8.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE RUT", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnBuscarRutAuto.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarRutAuto.setText("BUSCAR");
        btnBuscarRutAuto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarRutAutoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlIngreseRutGarante8Layout = new javax.swing.GroupLayout(pnlIngreseRutGarante8);
        pnlIngreseRutGarante8.setLayout(pnlIngreseRutGarante8Layout);
        pnlIngreseRutGarante8Layout.setHorizontalGroup(
            pnlIngreseRutGarante8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGarante8Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlIngreseRutGarante8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnBuscarRutAuto, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtRutInformeAuto, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(18, Short.MAX_VALUE))
        );
        pnlIngreseRutGarante8Layout.setVerticalGroup(
            pnlIngreseRutGarante8Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGarante8Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(txtRutInformeAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(btnBuscarRutAuto)
                .addContainerGap())
        );

        buttonGroup2.add(chkInformeAuto);
        chkInformeAuto.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkInformeAuto.setText("BUSCAR POR RUT");
        chkInformeAuto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkInformeAutoActionPerformed(evt);
            }
        });

        buttonGroup2.add(chkFechaInformeAuto);
        chkFechaInformeAuto.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkFechaInformeAuto.setText("BUSCAR POR FECHA");
        chkFechaInformeAuto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkFechaInformeAutoActionPerformed(evt);
            }
        });

        pnlIngreseRutGarante16.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE FECHAS", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel40.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel40.setText("DESDE");

        btnFechaInformeAuto.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnFechaInformeAuto.setText("BUSCAR");
        btnFechaInformeAuto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFechaInformeAutoActionPerformed(evt);
            }
        });

        jLabel16.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel16.setText("HASTA");

        jcDesdeInformeAuto.setDateFormatString("d-M-yyyy");

        jcHastaInformeAuto.setDateFormatString("d-M-yyyy");

        javax.swing.GroupLayout pnlIngreseRutGarante16Layout = new javax.swing.GroupLayout(pnlIngreseRutGarante16);
        pnlIngreseRutGarante16.setLayout(pnlIngreseRutGarante16Layout);
        pnlIngreseRutGarante16Layout.setHorizontalGroup(
            pnlIngreseRutGarante16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGarante16Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlIngreseRutGarante16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel40)
                    .addComponent(jLabel16))
                .addGap(18, 18, 18)
                .addGroup(pnlIngreseRutGarante16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jcDesdeInformeAuto, javax.swing.GroupLayout.DEFAULT_SIZE, 139, Short.MAX_VALUE)
                    .addComponent(jcHastaInformeAuto, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnFechaInformeAuto, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pnlIngreseRutGarante16Layout.setVerticalGroup(
            pnlIngreseRutGarante16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGarante16Layout.createSequentialGroup()
                .addContainerGap(14, Short.MAX_VALUE)
                .addGroup(pnlIngreseRutGarante16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlIngreseRutGarante16Layout.createSequentialGroup()
                        .addGroup(pnlIngreseRutGarante16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel40)
                            .addComponent(jcDesdeInformeAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlIngreseRutGarante16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel16)
                            .addComponent(jcHastaInformeAuto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(13, 13, 13))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlIngreseRutGarante16Layout.createSequentialGroup()
                        .addComponent(btnFechaInformeAuto)
                        .addGap(21, 21, 21))))
        );

        jTInformeAuto.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jTInformeAuto.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "N° FOLIO", "RUT", "AP. PATERNO", "AP. MATERNO", "NOMBRE", "SUCURSAL", "MARCA", "PATENTE", "N° CHASIS", "FECHA CREACIÓN", "MONEDA", "N° MOTOR", "MODELO", "N° REG. PRENDA", "FECHA EXTINCIÓN", "ESTADO GARANTIA"
            }
        ));
        jTInformeAuto.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        jTInformeAuto.getTableHeader().setResizingAllowed(false);
        jTInformeAuto.getTableHeader().setReorderingAllowed(false);
        jScrollPane12.setViewportView(jTInformeAuto);
        jTInformeAuto.getColumnModel().getColumn(0).setPreferredWidth(70);
        jTInformeAuto.getColumnModel().getColumn(1).setPreferredWidth(100);
        jTInformeAuto.getColumnModel().getColumn(2).setPreferredWidth(100);
        jTInformeAuto.getColumnModel().getColumn(3).setPreferredWidth(100);
        jTInformeAuto.getColumnModel().getColumn(4).setPreferredWidth(100);
        jTInformeAuto.getColumnModel().getColumn(5).setPreferredWidth(100);
        jTInformeAuto.getColumnModel().getColumn(6).setPreferredWidth(100);
        jTInformeAuto.getColumnModel().getColumn(7).setPreferredWidth(100);
        jTInformeAuto.getColumnModel().getColumn(8).setPreferredWidth(100);
        jTInformeAuto.getColumnModel().getColumn(9).setPreferredWidth(120);
        jTInformeAuto.getColumnModel().getColumn(10).setPreferredWidth(100);
        jTInformeAuto.getColumnModel().getColumn(11).setPreferredWidth(100);
        jTInformeAuto.getColumnModel().getColumn(12).setPreferredWidth(100);
        jTInformeAuto.getColumnModel().getColumn(13).setPreferredWidth(100);
        jTInformeAuto.getColumnModel().getColumn(14).setPreferredWidth(120);

        btnVolver2.setText("VOLVER");
        btnVolver2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVolver2ActionPerformed(evt);
            }
        });

        jPanelBuscarTodasLasGarantiasAutomotriz.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "BUSCAR TODAS LAS GARANTÍAS", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnBuscarTodasLasGarantiasAutomotriz.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarTodasLasGarantiasAutomotriz.setText("BUSCAR");
        btnBuscarTodasLasGarantiasAutomotriz.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarTodasLasGarantiasAutomotrizActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelBuscarTodasLasGarantiasAutomotrizLayout = new javax.swing.GroupLayout(jPanelBuscarTodasLasGarantiasAutomotriz);
        jPanelBuscarTodasLasGarantiasAutomotriz.setLayout(jPanelBuscarTodasLasGarantiasAutomotrizLayout);
        jPanelBuscarTodasLasGarantiasAutomotrizLayout.setHorizontalGroup(
            jPanelBuscarTodasLasGarantiasAutomotrizLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelBuscarTodasLasGarantiasAutomotrizLayout.createSequentialGroup()
                .addContainerGap(39, Short.MAX_VALUE)
                .addComponent(btnBuscarTodasLasGarantiasAutomotriz, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(32, 32, 32))
        );
        jPanelBuscarTodasLasGarantiasAutomotrizLayout.setVerticalGroup(
            jPanelBuscarTodasLasGarantiasAutomotrizLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelBuscarTodasLasGarantiasAutomotrizLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnBuscarTodasLasGarantiasAutomotriz)
                .addGap(23, 23, 23))
        );

        buttonGroup2.add(chkBuscarTodasLasGarantiasAutomotriz);
        chkBuscarTodasLasGarantiasAutomotriz.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkBuscarTodasLasGarantiasAutomotriz.setText("BUSCAR TODAS LAS GARANTÍAS");
        chkBuscarTodasLasGarantiasAutomotriz.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkBuscarTodasLasGarantiasAutomotrizActionPerformed(evt);
            }
        });

        btnImprimirInformeGarantiaAuto.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N
        btnImprimirInformeGarantiaAuto.setText("IMPRIMIR");
        btnImprimirInformeGarantiaAuto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImprimirInformeGarantiaAutoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel20Layout = new javax.swing.GroupLayout(jPanel20);
        jPanel20.setLayout(jPanel20Layout);
        jPanel20Layout.setHorizontalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel20Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(jPanel20Layout.createSequentialGroup()
                        .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pnlIngreseRutGarante8, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkInformeAuto))
                        .addGap(164, 164, 164)
                        .addComponent(chkFechaInformeAuto)
                        .addGap(115, 115, 115)
                        .addComponent(chkBuscarTodasLasGarantiasAutomotriz))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel20Layout.createSequentialGroup()
                        .addComponent(btnImprimirInformeGarantiaAuto, javax.swing.GroupLayout.PREFERRED_SIZE, 97, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(243, 243, 243)
                        .addComponent(btnVolver2))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel20Layout.createSequentialGroup()
                        .addGap(202, 202, 202)
                        .addComponent(pnlIngreseRutGarante16, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(jPanelBuscarTodasLasGarantiasAutomotriz, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addComponent(jScrollPane12, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 771, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(20, Short.MAX_VALUE))
        );
        jPanel20Layout.setVerticalGroup(
            jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel20Layout.createSequentialGroup()
                .addContainerGap(12, Short.MAX_VALUE)
                .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(chkInformeAuto, javax.swing.GroupLayout.Alignment.TRAILING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(chkFechaInformeAuto)
                        .addComponent(chkBuscarTodasLasGarantiasAutomotriz)))
                .addGap(18, 18, 18)
                .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnlIngreseRutGarante8, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 94, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(pnlIngreseRutGarante16, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelBuscarTodasLasGarantiasAutomotriz, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jScrollPane12, javax.swing.GroupLayout.PREFERRED_SIZE, 272, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(12, 12, 12)
                .addGroup(jPanel20Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnVolver2)
                    .addComponent(btnImprimirInformeGarantiaAuto))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(jPanel20, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel3Layout.createSequentialGroup()
                .addComponent(jPanel20, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 8, Short.MAX_VALUE))
        );

        jTabbedPane2.addTab("AUTOMOTRIZ", jPanel3);

        pnlIngreseRutGarante7.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE RUT", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnRutInformeWarra.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnRutInformeWarra.setText("BUSCAR");
        btnRutInformeWarra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRutInformeWarraActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlIngreseRutGarante7Layout = new javax.swing.GroupLayout(pnlIngreseRutGarante7);
        pnlIngreseRutGarante7.setLayout(pnlIngreseRutGarante7Layout);
        pnlIngreseRutGarante7Layout.setHorizontalGroup(
            pnlIngreseRutGarante7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGarante7Layout.createSequentialGroup()
                .addGap(22, 22, 22)
                .addGroup(pnlIngreseRutGarante7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnRutInformeWarra, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(txtRutInformeWarra, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(33, Short.MAX_VALUE))
        );
        pnlIngreseRutGarante7Layout.setVerticalGroup(
            pnlIngreseRutGarante7Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGarante7Layout.createSequentialGroup()
                .addGap(6, 6, 6)
                .addComponent(txtRutInformeWarra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnRutInformeWarra)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        buttonGroup3.add(chkRutInfoWarra);
        chkRutInfoWarra.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkRutInfoWarra.setText("BUSCAR POR RUT");
        chkRutInfoWarra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkRutInfoWarraActionPerformed(evt);
            }
        });

        buttonGroup3.add(chkFechaInformeWarra);
        chkFechaInformeWarra.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkFechaInformeWarra.setText("BUSCAR POR FECHA");
        chkFechaInformeWarra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkFechaInformeWarraActionPerformed(evt);
            }
        });

        pnlIngreseRutGarante15.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE FECHAS", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel39.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel39.setText("DESDE");

        btnFechaInformeWarra.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnFechaInformeWarra.setText("BUSCAR");
        btnFechaInformeWarra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFechaInformeWarraActionPerformed(evt);
            }
        });

        jLabel15.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel15.setText("HASTA");

        jcDesdeInformeWarra.setDateFormatString("d-M-yyyy");

        jcHastaInformeWarra.setDateFormatString("d-M-yyyy");

        javax.swing.GroupLayout pnlIngreseRutGarante15Layout = new javax.swing.GroupLayout(pnlIngreseRutGarante15);
        pnlIngreseRutGarante15.setLayout(pnlIngreseRutGarante15Layout);
        pnlIngreseRutGarante15Layout.setHorizontalGroup(
            pnlIngreseRutGarante15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGarante15Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlIngreseRutGarante15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel39)
                    .addComponent(jLabel15))
                .addGap(18, 18, 18)
                .addGroup(pnlIngreseRutGarante15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jcDesdeInformeWarra, javax.swing.GroupLayout.DEFAULT_SIZE, 148, Short.MAX_VALUE)
                    .addComponent(jcHastaInformeWarra, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnFechaInformeWarra, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pnlIngreseRutGarante15Layout.setVerticalGroup(
            pnlIngreseRutGarante15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGarante15Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlIngreseRutGarante15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlIngreseRutGarante15Layout.createSequentialGroup()
                        .addGroup(pnlIngreseRutGarante15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel39)
                            .addComponent(jcDesdeInformeWarra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addGroup(pnlIngreseRutGarante15Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jLabel15)
                            .addComponent(jcHastaInformeWarra, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(13, 13, 13))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlIngreseRutGarante15Layout.createSequentialGroup()
                        .addComponent(btnFechaInformeWarra)
                        .addGap(21, 21, 21))))
        );

        jTInformeWarra.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jTInformeWarra.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "N° FOLIO", "RUT", "AP. PATERNO", "AP. MATERNO", "NOMBRE", "SUCURSAL", "TIPO PROD.", "PRODUCTO", "MONEDA", "FECHA EXTINCIÓN", "ESTADO GARANTIA"
            }
        ));
        jTInformeWarra.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        jTInformeWarra.getTableHeader().setResizingAllowed(false);
        jTInformeWarra.getTableHeader().setReorderingAllowed(false);
        jScrollPane13.setViewportView(jTInformeWarra);
        jTInformeWarra.getColumnModel().getColumn(0).setPreferredWidth(70);
        jTInformeWarra.getColumnModel().getColumn(1).setPreferredWidth(100);
        jTInformeWarra.getColumnModel().getColumn(2).setPreferredWidth(100);
        jTInformeWarra.getColumnModel().getColumn(3).setPreferredWidth(100);
        jTInformeWarra.getColumnModel().getColumn(4).setPreferredWidth(100);
        jTInformeWarra.getColumnModel().getColumn(5).setPreferredWidth(100);
        jTInformeWarra.getColumnModel().getColumn(6).setPreferredWidth(100);
        jTInformeWarra.getColumnModel().getColumn(7).setPreferredWidth(100);
        jTInformeWarra.getColumnModel().getColumn(8).setPreferredWidth(100);
        jTInformeWarra.getColumnModel().getColumn(9).setPreferredWidth(120);

        btnVolver3.setText("VOLVER");
        btnVolver3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVolver3ActionPerformed(evt);
            }
        });

        jPanelBuscarTodasLasGarantiasWarrant.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "BUSCAR TODAS LAS GARANTÍAS", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnBuscarTodasLasGarantiasWarrant.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarTodasLasGarantiasWarrant.setText("BUSCAR");
        btnBuscarTodasLasGarantiasWarrant.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarTodasLasGarantiasWarrantActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelBuscarTodasLasGarantiasWarrantLayout = new javax.swing.GroupLayout(jPanelBuscarTodasLasGarantiasWarrant);
        jPanelBuscarTodasLasGarantiasWarrant.setLayout(jPanelBuscarTodasLasGarantiasWarrantLayout);
        jPanelBuscarTodasLasGarantiasWarrantLayout.setHorizontalGroup(
            jPanelBuscarTodasLasGarantiasWarrantLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelBuscarTodasLasGarantiasWarrantLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnBuscarTodasLasGarantiasWarrant, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(45, 45, 45))
        );
        jPanelBuscarTodasLasGarantiasWarrantLayout.setVerticalGroup(
            jPanelBuscarTodasLasGarantiasWarrantLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelBuscarTodasLasGarantiasWarrantLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnBuscarTodasLasGarantiasWarrant)
                .addGap(21, 21, 21))
        );

        buttonGroup3.add(chkBuscarTodasLasGarantiasWarrant);
        chkBuscarTodasLasGarantiasWarrant.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkBuscarTodasLasGarantiasWarrant.setText("BUSCAR TODAS LAS GARANTÍAS");
        chkBuscarTodasLasGarantiasWarrant.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkBuscarTodasLasGarantiasWarrantActionPerformed(evt);
            }
        });

        btnImprimirInformeGarantiaWarra.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N
        btnImprimirInformeGarantiaWarra.setText("IMPRIMIR");
        btnImprimirInformeGarantiaWarra.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImprimirInformeGarantiaWarraActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel18Layout = new javax.swing.GroupLayout(jPanel18);
        jPanel18.setLayout(jPanel18Layout);
        jPanel18Layout.setHorizontalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addComponent(jScrollPane13, javax.swing.GroupLayout.PREFERRED_SIZE, 757, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(jPanel18Layout.createSequentialGroup()
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(pnlIngreseRutGarante7, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(chkRutInfoWarra))
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel18Layout.createSequentialGroup()
                                .addGap(27, 27, 27)
                                .addComponent(pnlIngreseRutGarante15, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(jPanel18Layout.createSequentialGroup()
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                .addComponent(chkFechaInformeWarra, javax.swing.GroupLayout.PREFERRED_SIZE, 156, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addGap(113, 113, 113)))
                        .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(chkBuscarTodasLasGarantiasWarrant, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(jPanelBuscarTodasLasGarantiasWarrant, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
                .addContainerGap())
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel18Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnImprimirInformeGarantiaWarra, javax.swing.GroupLayout.PREFERRED_SIZE, 105, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(191, 191, 191)
                .addComponent(btnVolver3)
                .addGap(28, 28, 28))
        );
        jPanel18Layout.setVerticalGroup(
            jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel18Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(chkBuscarTodasLasGarantiasWarrant, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                        .addComponent(chkRutInfoWarra)
                        .addComponent(chkFechaInformeWarra)))
                .addGap(7, 7, 7)
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnlIngreseRutGarante15, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlIngreseRutGarante7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanelBuscarTodasLasGarantiasWarrant, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addGap(18, 18, 18)
                .addComponent(jScrollPane13, javax.swing.GroupLayout.PREFERRED_SIZE, 279, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jPanel18Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnVolver3)
                    .addComponent(btnImprimirInformeGarantiaWarra)))
        );

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 24, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addComponent(jPanel18, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 20, Short.MAX_VALUE))
        );

        jTabbedPane2.addTab("WARRANT", jPanel4);

        pnlIngreseRutGarante6.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE RUT", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnRutInformeCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnRutInformeCDP.setText("BUSCAR");
        btnRutInformeCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnRutInformeCDPActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlIngreseRutGarante6Layout = new javax.swing.GroupLayout(pnlIngreseRutGarante6);
        pnlIngreseRutGarante6.setLayout(pnlIngreseRutGarante6Layout);
        pnlIngreseRutGarante6Layout.setHorizontalGroup(
            pnlIngreseRutGarante6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGarante6Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlIngreseRutGarante6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(txtRutInformeCDP)
                    .addComponent(btnRutInformeCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlIngreseRutGarante6Layout.setVerticalGroup(
            pnlIngreseRutGarante6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGarante6Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(txtRutInformeCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnRutInformeCDP)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        buttonGroup4.add(chkRutInformeCDP);
        chkRutInformeCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkRutInformeCDP.setText("BUSCAR POR RUT");
        chkRutInformeCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkRutInformeCDPActionPerformed(evt);
            }
        });

        buttonGroup4.add(chkFechaInformeCDP);
        chkFechaInformeCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkFechaInformeCDP.setText("BUSCAR POR FECHA");
        chkFechaInformeCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkFechaInformeCDPActionPerformed(evt);
            }
        });

        pnlIngreseRutGarante14.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "INGRESE FECHAS", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        jLabel38.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel38.setText("DESDE");

        btnFechaInformeCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnFechaInformeCDP.setText("BUSCAR");
        btnFechaInformeCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnFechaInformeCDPActionPerformed(evt);
            }
        });

        jLabel14.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        jLabel14.setText("HASTA");

        jcDesdeInformeCDP.setDateFormatString("d-M-yyyy");

        jcHastaInformeCDP.setDateFormatString("d-M-yyyy");

        javax.swing.GroupLayout pnlIngreseRutGarante14Layout = new javax.swing.GroupLayout(pnlIngreseRutGarante14);
        pnlIngreseRutGarante14.setLayout(pnlIngreseRutGarante14Layout);
        pnlIngreseRutGarante14Layout.setHorizontalGroup(
            pnlIngreseRutGarante14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGarante14Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlIngreseRutGarante14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel38)
                    .addComponent(jLabel14))
                .addGap(18, 18, 18)
                .addGroup(pnlIngreseRutGarante14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jcDesdeInformeCDP, javax.swing.GroupLayout.DEFAULT_SIZE, 136, Short.MAX_VALUE)
                    .addComponent(jcHastaInformeCDP, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(btnFechaInformeCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        pnlIngreseRutGarante14Layout.setVerticalGroup(
            pnlIngreseRutGarante14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlIngreseRutGarante14Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(pnlIngreseRutGarante14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel38)
                    .addComponent(jcDesdeInformeCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(pnlIngreseRutGarante14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel14)
                    .addComponent(jcHastaInformeCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(13, 13, 13))
            .addGroup(pnlIngreseRutGarante14Layout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addComponent(btnFechaInformeCDP)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jtableInformeCdp.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "Nº FOLIO", "RUT", "AP. PATERNO", "AP. MATERNO", "NOMBRE", "SUCURSAL", "FECHA CREACION", "MONEDA", "FECHA EXTINCION", "ESTADO GARANTIA"
            }
        ));
        jtableInformeCdp.setAutoResizeMode(javax.swing.JTable.AUTO_RESIZE_OFF);
        jScrollPane1.setViewportView(jtableInformeCdp);

        btnVolver1.setText("VOLVER");
        btnVolver1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnVolver1ActionPerformed(evt);
            }
        });

        jPanelBuscarTodasLasGarantiasCDP.setBorder(javax.swing.BorderFactory.createTitledBorder(null, "BUSCAR TODAS LAS GARANTÍAS", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Century Gothic", 1, 10), java.awt.Color.blue)); // NOI18N

        btnBuscarTodasLasGarantiasCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        btnBuscarTodasLasGarantiasCDP.setText("BUSCAR");
        btnBuscarTodasLasGarantiasCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnBuscarTodasLasGarantiasCDPActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanelBuscarTodasLasGarantiasCDPLayout = new javax.swing.GroupLayout(jPanelBuscarTodasLasGarantiasCDP);
        jPanelBuscarTodasLasGarantiasCDP.setLayout(jPanelBuscarTodasLasGarantiasCDPLayout);
        jPanelBuscarTodasLasGarantiasCDPLayout.setHorizontalGroup(
            jPanelBuscarTodasLasGarantiasCDPLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelBuscarTodasLasGarantiasCDPLayout.createSequentialGroup()
                .addGap(40, 40, 40)
                .addComponent(btnBuscarTodasLasGarantiasCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 88, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(40, Short.MAX_VALUE))
        );
        jPanelBuscarTodasLasGarantiasCDPLayout.setVerticalGroup(
            jPanelBuscarTodasLasGarantiasCDPLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanelBuscarTodasLasGarantiasCDPLayout.createSequentialGroup()
                .addGap(23, 23, 23)
                .addComponent(btnBuscarTodasLasGarantiasCDP)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        buttonGroup4.add(chkBuscarTodasLasGarantiasCDP);
        chkBuscarTodasLasGarantiasCDP.setFont(new java.awt.Font("Century Gothic", 0, 12)); // NOI18N
        chkBuscarTodasLasGarantiasCDP.setText("BUSCAR TODAS LAS GARANTÍAS");
        chkBuscarTodasLasGarantiasCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                chkBuscarTodasLasGarantiasCDPActionPerformed(evt);
            }
        });

        btnImprimirInformeGarantiaCDP.setFont(new java.awt.Font("Century Gothic", 0, 11)); // NOI18N
        btnImprimirInformeGarantiaCDP.setText("IMPRIMIR");
        btnImprimirInformeGarantiaCDP.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnImprimirInformeGarantiaCDPActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel16Layout = new javax.swing.GroupLayout(jPanel16);
        jPanel16.setLayout(jPanel16Layout);
        jPanel16Layout.setHorizontalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addGap(25, 25, 25)
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel16Layout.createSequentialGroup()
                        .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(chkRutInformeCDP)
                            .addComponent(pnlIngreseRutGarante6, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(49, 49, 49)
                        .addComponent(pnlIngreseRutGarante14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addContainerGap(255, Short.MAX_VALUE))
                    .addGroup(jPanel16Layout.createSequentialGroup()
                        .addGap(334, 334, 334)
                        .addComponent(btnImprimirInformeGarantiaCDP, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addComponent(btnVolver1)
                        .addGap(20, 20, 20))))
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 751, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel16Layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jPanelBuscarTodasLasGarantiasCDP, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(jPanel16Layout.createSequentialGroup()
                        .addComponent(chkFechaInformeCDP)
                        .addGap(120, 120, 120)
                        .addComponent(chkBuscarTodasLasGarantiasCDP)))
                .addGap(24, 24, 24))
        );
        jPanel16Layout.setVerticalGroup(
            jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel16Layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(chkFechaInformeCDP)
                    .addComponent(chkRutInformeCDP)
                    .addComponent(chkBuscarTodasLasGarantiasCDP))
                .addGap(18, 18, 18)
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                        .addComponent(pnlIngreseRutGarante6, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 89, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addComponent(jPanelBuscarTodasLasGarantiasCDP, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                    .addComponent(pnlIngreseRutGarante14, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 8, Short.MAX_VALUE)
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jPanel16Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(btnVolver1)
                    .addComponent(btnImprimirInformeGarantiaCDP))
                .addContainerGap())
        );

        javax.swing.GroupLayout jPanel9Layout = new javax.swing.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel9Layout.createSequentialGroup()
                .addComponent(jPanel16, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane2.addTab("CDP", jPanel9);

        jLabel1.setText("MENÚ PRINCIPAL\\INFORME DE GARANTÍAS");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel2)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(111, 111, 111)
                        .addComponent(jLabel4))
                    .addGroup(layout.createSequentialGroup()
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel1)))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(layout.createSequentialGroup()
                .addComponent(jTabbedPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 806, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(0, 0, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jLabel4)
                    .addComponent(jLabel2)
                    .addComponent(jLabel1, javax.swing.GroupLayout.Alignment.TRAILING))
                .addGap(18, 18, 18)
                .addComponent(jTabbedPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 514, javax.swing.GroupLayout.PREFERRED_SIZE))
        );

        setSize(new java.awt.Dimension(822, 655));
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void btnRutInformeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRutInformeActionPerformed
        
        try
        {
            if(ValidarRutDAO.validarRut(this.txtRutInforme.getText().toUpperCase()))
           {
          javax.swing.JOptionPane.showMessageDialog(this, "Rut valido");
       String rut = this.txtRutInforme.getText();
       if (this.txtRutInforme.getText().length() == 0) // validamos campos vacios
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese un Rut valido");
            this.txtRutInforme.setText("");
            DefaultTableModel modelo =(DefaultTableModel)this.jTInformeHipo.getModel();
            modelo.setNumRows(0);
            this.jcDesdeInforme.setCalendar(null);
            this.jcHastaInforme.setCalendar(null);
        }
       else
       {        
       
         ArrayList<garantiaHipotecariaDTO> salida = garaHipo.ListarPorRutHipo(rut);
        if (salida.isEmpty()) {
            DefaultTableModel modelo =(DefaultTableModel)this.jTInformeHipo.getModel();
            modelo.setNumRows(0);
            javax.swing.JOptionPane.showMessageDialog(null, "No se encontraron Garantias");
            this.jcDesdeInforme.setCalendar(null);
            this.jcHastaInforme.setCalendar(null);
        }
        else
        {
            this.jcDesdeInforme.setCalendar(null);
            this.jcHastaInforme.setCalendar(null);
            DefaultTableModel modelo =(DefaultTableModel)this.jTInformeHipo.getModel();
            modelo.setNumRows(0);
            for(garantiaHipotecariaDTO x: salida)
           { 
              Object[] arr={
                   x.getFolio_garantia_hipo(),
                   x.getRut_gara_hipo(),
                   x.getApell_paterno_hipo(),
                   x.getApell_materno_hipo(),
                   x.getNombre_hipo(),
                   x.getSucursal_hipo(),
                   x.getCobertura_hipo(),
                   x.getSuperficie_hipo(),
                   x.getRegistro_cbr_hipo(),
                   x.getRol_sii_hipo(),
                   x.getFech_crea_hipo(),
                   x.getMoneda_hipo(),
                   x.getTipo_construccion_hipo(),
                   x.getComuna_hipo(),
                   x.getEstado_constrib_hipo(),
                   x.getMts_construidos_hipo(),
                   x.getFech_extincion_hipo(),
                   x.getEstado_hipo()
               };
               modelo.addRow(arr);
        }
        }

   }              
        }else
    {
        javax.swing.JOptionPane.showMessageDialog(this, "Rut invalido");
    }
        }catch(Exception e)
        {
            e.getMessage();
        }
              
    }//GEN-LAST:event_btnRutInformeActionPerformed

    private void btnFechaInformeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFechaInformeActionPerformed
        
        this.txtRutInforme.setText(null);   
        try
        {
        String desde = (new SimpleDateFormat("d/M/yyyy").format(jcDesdeInforme.getDate()));
        String hasta = (new SimpleDateFormat("d/M/yyyy").format(jcHastaInforme.getDate()));
        
        if(desde.equals("") && hasta.equals(""))
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese Fechas validas");
            DefaultTableModel modelo = (DefaultTableModel)this.jTInformeHipo.getModel();
            modelo.setNumRows(0);
            this.txtRutInforme.setText(null);
        }
        else{
        ArrayList<garantiaHipotecariaDTO> lista = garaHipo.ListarPorFechaHipo(desde, hasta);
       
       if(lista.isEmpty())
       {
           javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
           DefaultTableModel modelo = (DefaultTableModel)this.jTInformeHipo.getModel();
           modelo.setNumRows(0);
           this.txtRutInforme.setText(null);
       }
       else{
           this.txtRutInforme.setText(null);
           DefaultTableModel modelo = (DefaultTableModel)this.jTInformeHipo.getModel();
           modelo.setNumRows(0);
           for(garantiaHipotecariaDTO x: lista)
           {
               Object[]arr={
                   x.getFolio_garantia_hipo(),
                   x.getRut_gara_hipo(),
                   x.getApell_paterno_hipo(),
                   x.getApell_materno_hipo(),
                   x.getNombre_hipo(),   
                   x.getSucursal_hipo(),
                   x.getCobertura_hipo(),
                   x.getSuperficie_hipo(),
                   x.getRegistro_cbr_hipo(),
                   x.getRol_sii_hipo(),
                   x.getFech_crea_hipo(),
                   x.getMoneda_hipo(),
                   x.getTipo_construccion_hipo(),
                   x.getComuna_hipo(),
                   x.getEstado_constrib_hipo(),
                   x.getMts_construidos_hipo(),
                   x.getFech_extincion_hipo(),
                   x.getEstado_hipo()
                };
               modelo.addRow(arr);
                }
            }
        }
        }catch(Exception e)
        {
            e.getMessage();
        }
        
        
    }//GEN-LAST:event_btnFechaInformeActionPerformed

    private void btnBuscarRutAutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarRutAutoActionPerformed
       jcDesdeInformeAuto.setCalendar(null);
       jcHastaInformeAuto.setCalendar(null);
        try
       {
           if(ValidarRutDAO.validarRut(this.txtRutInformeAuto.getText().toUpperCase()))
           {
          javax.swing.JOptionPane.showMessageDialog(this, "Rut valido");
        String rut = this.txtRutInformeAuto.getText();
       if (this.txtRutInformeAuto.getText().length() == 0) // validamos campos vacios
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese Rut");
            DefaultTableModel modelo = (DefaultTableModel)this.jTInformeAuto.getModel();
            modelo.setNumRows(0);
        }
       else{
       
       ArrayList<garantiaAutomotrizDTO> lista = garaAuto.ListarPorRutAuto(rut);
       
       if(lista.isEmpty())
       {
           javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
           DefaultTableModel modelo = (DefaultTableModel)this.jTInformeAuto.getModel();
           modelo.setNumRows(0);
       }
       else{
           DefaultTableModel modelo = (DefaultTableModel)this.jTInformeAuto.getModel();
           modelo.setNumRows(0);
           for(garantiaAutomotrizDTO x: lista)
           {
               Object[]arr={
                   x.getFolio_garantia_auto(),
                   x.getRut_gara_auto(),
                   x.getApell_paterno_auto(),
                   x.getApell_materno_auto(),
                   x.getNombre_auto(),
                   x.getSucursal_auto(),
                   x.getMarca_auto(),
                   x.getPatente_auto(),
                   x.getNum_chasis_auto(),
                   x.getFech_crea_auto(),
                   x.getMoneda_auto(),
                   x.getNum_motor_auto(),
                   x.getModelo_auto(),
                   x.getNum_reg_prenda_auto(),
                   x.getFech_extincion_auto(),
                   x.getEstado_auto()
               };
               modelo.addRow(arr);
           }
       }
       }}else
    {
        javax.swing.JOptionPane.showMessageDialog(this, "Rut invalido");
    }
       }catch(Exception e)
       {
           e.getMessage();
       }
    }//GEN-LAST:event_btnBuscarRutAutoActionPerformed

    private void btnFechaInformeAutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFechaInformeAutoActionPerformed
        txtRutInformeAuto.setText("");
        try
        {
        String desde = (new SimpleDateFormat("d/M/yyyy").format(jcDesdeInformeAuto.getDate()));
        String hasta = (new SimpleDateFormat("d/M/yyyy").format(jcHastaInformeAuto.getDate()));
        
        
        ArrayList<garantiaAutomotrizDTO> lista = garaAuto.ListarPorFechaAuto(desde, hasta);
        if(lista.isEmpty())
        {
           javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
        DefaultTableModel modelo = (DefaultTableModel)this.jTInformeAuto.getModel();
           modelo.setNumRows(0);
        }
       else{
           DefaultTableModel modelo = (DefaultTableModel)this.jTInformeAuto.getModel();
           modelo.setNumRows(0);
           for(garantiaAutomotrizDTO x: lista)
           {
               Object[]arr={
                   x.getFolio_garantia_auto(),
                   x.getRut_gara_auto(),
                   x.getApell_paterno_auto(),
                   x.getApell_materno_auto(),
                   x.getNombre_auto(),
                   x.getSucursal_auto(),
                   x.getMarca_auto(),
                   x.getPatente_auto(),
                   x.getNum_chasis_auto(),
                   x.getFech_crea_auto(),
                   x.getMoneda_auto(),
                   x.getNum_motor_auto(),
                   x.getModelo_auto(),
                   x.getNum_reg_prenda_auto(),
                   x.getFech_extincion_auto(),
                   x.getEstado_auto()
               };
               modelo.addRow(arr);
           }
       }
        }catch(Exception e)
        {
            e.getMessage();
        }
    }//GEN-LAST:event_btnFechaInformeAutoActionPerformed

    private void btnRutInformeWarraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRutInformeWarraActionPerformed
       jcDesdeInformeWarra.setCalendar(null);
       jcHastaInformeWarra.setCalendar(null);
       try
       {
       if(ValidarRutDAO.validarRut(this.txtRutInformeWarra.getText().toUpperCase()))
           {
          javax.swing.JOptionPane.showMessageDialog(this, "Rut valido");
        String rut = this.txtRutInformeWarra.getText();
      
       if (this.txtRutInformeWarra.getText().length() == 0) // validamos campos vacios
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese Rut");
            DefaultTableModel modelo = (DefaultTableModel)this.jTInformeWarra.getModel();
           modelo.setNumRows(0);
        }
       else{
        
       ArrayList<garantiaWarrantsDTO> lista = garaWarra.ListarPorRutWarra(rut);
       
       if(lista.isEmpty())
       {
           javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
           DefaultTableModel modelo = (DefaultTableModel)this.jTInformeWarra.getModel();
           modelo.setNumRows(0);
       }
       else{
           DefaultTableModel modelo = (DefaultTableModel)this.jTInformeWarra.getModel();
           modelo.setNumRows(0);
           for(garantiaWarrantsDTO x: lista)
           {
               Object[]arr={
                   x.getFolio_warra(),
                   x.getRut_garante_warra(),
                   x.getApell_paterno_warra(),
                   x.getApell_materno_warra(),
                   x.getNombre_warra(),
                   x.getNom_sucursal_warra(),
                   x.getTipo_prod_warra(),
                   x.getIngre_prod_warra(),
                   x.getNom_moneda_warra(),
                   x.getFech_exti_warra(),
                   x.getEstado_warra()
                   
               };
               modelo.addRow(arr);
           }
       }
       }
    }else
    {
        javax.swing.JOptionPane.showMessageDialog(this, "Rut invalido");
    }}catch(Exception e)
    {
        e.getMessage();
    }
    }//GEN-LAST:event_btnRutInformeWarraActionPerformed

    private void btnFechaInformeWarraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFechaInformeWarraActionPerformed
        txtRutInformeWarra.setText("");
        try
        {
        String desde = (new SimpleDateFormat("d/M/yyyy").format(jcDesdeInformeWarra.getDate()));
        String hasta = (new SimpleDateFormat("d/M/yyyy").format(jcHastaInformeWarra.getDate()));
        
        ArrayList<garantiaWarrantsDTO> lista = garaWarra.ListarPorFechaWarra(desde, hasta);
        if(lista.isEmpty())
        {
           javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
           DefaultTableModel modelo = (DefaultTableModel)this.jTInformeWarra.getModel();
           modelo.setNumRows(0);
        }
       else{
           DefaultTableModel modelo = (DefaultTableModel)this.jTInformeWarra.getModel();
           modelo.setNumRows(0);
           for(garantiaWarrantsDTO x: lista)
           {
               Object[]arr={
                   x.getFolio_warra(),
                   x.getRut_garante_warra(),
                   x.getApell_paterno_warra(),
                   x.getApell_materno_warra(),
                   x.getNombre_warra(),
                   x.getNom_sucursal_warra(),
                   x.getTipo_prod_warra(),
                   x.getIngre_prod_warra(),
                   x.getNom_moneda_warra(),
                   x.getFech_exti_warra(),
                   x.getEstado_warra()
               };
               modelo.addRow(arr);
           }
       }
        }catch(Exception e)
        {
            e.getMessage();
        }
    }//GEN-LAST:event_btnFechaInformeWarraActionPerformed

    private void btnRutInformeCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnRutInformeCDPActionPerformed
        jcDesdeInformeCDP.setCalendar(null);
        jcHastaInformeCDP.setCalendar(null);
        try
        {  
        if(ValidarRutDAO.validarRut(this.txtRutInformeCDP.getText().toUpperCase()))
           {
          javax.swing.JOptionPane.showMessageDialog(this, "Rut valido");
          String rut = this.txtRutInformeCDP.getText();
        if (this.txtRutInformeCDP.getText().length() == 0) // validamos campos vacios
        {
            javax.swing.JOptionPane.showMessageDialog(this, "Ingrese Rut");
            DefaultTableModel modelo = (DefaultTableModel)this.jtableInformeCdp.getModel();
           modelo.setNumRows(0);
        }
        else{
        
        ArrayList<garantiaCdpOtrosDTO> lista = garaCdp.ListarPorRutCdp(rut);
        
        if(lista.isEmpty())
        {
          javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
        DefaultTableModel modelo = (DefaultTableModel)this.jtableInformeCdp.getModel();
          modelo.setNumRows(0);
        }
       else{
           DefaultTableModel modelo = (DefaultTableModel)this.jtableInformeCdp.getModel();
           modelo.setNumRows(0);
           for(garantiaCdpOtrosDTO x: lista)
           {
               Object[] arr={
                   x.getFolio_cdp(),
                   x.getRut_gara_cdp(),
                   x.getApell_paterno_cdp(),
                   x.getApell_materno_cdp(),
                   x.getNom_garantia_cdp(),
                   x.getSucu_cdp(),
                   x.getFech_crea_cdp(),
                   x.getNom_moneda_cdp(),
                   x.getFech_extin_cdp(),
                   x.getEstado_cdp()
               };
               modelo.addRow(arr);    
               }
        }
        }
        }else
    {
        javax.swing.JOptionPane.showMessageDialog(this, "Rut invalido");
    }}catch(Exception e)
        {
            e.getMessage();
        }
    }//GEN-LAST:event_btnRutInformeCDPActionPerformed

    private void btnFechaInformeCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnFechaInformeCDPActionPerformed
        try
        {
        String desde = (new SimpleDateFormat("d/M/yyyy").format(jcDesdeInformeCDP.getDate()));
        String hasta = (new SimpleDateFormat("d/M/yyyy").format(jcHastaInformeCDP.getDate()));
        
        ArrayList<garantiaCdpOtrosDTO> lista = garaCdp.ListarPorFechaCdp(desde, hasta);
        if(lista.isEmpty())
        {
           javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
           DefaultTableModel modelo = (DefaultTableModel)this.jtableInformeCdp.getModel();
           modelo.setNumRows(0);
        }
       else{
           DefaultTableModel modelo = (DefaultTableModel)this.jtableInformeCdp.getModel();
           modelo.setNumRows(0);
           for(garantiaCdpOtrosDTO x: lista)
           {
               Object[]arr={
                   x.getFolio_cdp(),
                   x.getRut_gara_cdp(),
                   x.getApell_paterno_cdp(),
                   x.getApell_materno_cdp(),
                   x.getNombre_cdp(),
                   x.getSucu_cdp(),
                   x.getFech_crea_cdp(),
                   x.getNom_moneda_cdp(),
                   x.getFech_extin_cdp(),
                   x.getEstado_cdp()
                   };
               modelo.addRow(arr);
           }
       }
        }
        catch(Exception e)
        {
            e.getMessage();
        }
    }//GEN-LAST:event_btnFechaInformeCDPActionPerformed

    private void btnVolver2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVolver2ActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        InformeTotalGtia.this.dispose();
    }//GEN-LAST:event_btnVolver2ActionPerformed

    private void btnVolver3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVolver3ActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        InformeTotalGtia.this.dispose();
    }//GEN-LAST:event_btnVolver3ActionPerformed

    private void btnVolver1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVolver1ActionPerformed
        MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        InformeTotalGtia.this.dispose();
    }//GEN-LAST:event_btnVolver1ActionPerformed

    private void btnVolvActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnVolvActionPerformed
         MenuPrincipal venMenuPrincipal = new MenuPrincipal(user);
        venMenuPrincipal.setVisible(true);
        InformeTotalGtia.this.dispose();
    }//GEN-LAST:event_btnVolvActionPerformed

    private void chkRutInformeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkRutInformeActionPerformed
     if(this.chkRutInforme.isSelected())
     {
         pnlIngreseRutGarante17.setVisible(false);
         jPanelBuscarTodasHipotecarias.setVisible(false);
         pnlIngreseRutGarante.setVisible(true);
         
     }
     
     
    }//GEN-LAST:event_chkRutInformeActionPerformed

    private void chkFechaInformeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkFechaInformeActionPerformed
       if(this.chkFechaInforme.isSelected())
       {
           pnlIngreseRutGarante.setVisible(false);
           jPanelBuscarTodasHipotecarias.setVisible(false);
           pnlIngreseRutGarante17.setVisible(true);
           
       }
       
    }//GEN-LAST:event_chkFechaInformeActionPerformed

    private void chkInformeAutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkInformeAutoActionPerformed
        if(this.chkInformeAuto.isSelected())
        {
           
            pnlIngreseRutGarante8.setVisible(true);
            pnlIngreseRutGarante16.setVisible(false);
            this.jPanelBuscarTodasLasGarantiasAutomotriz.setVisible(false);
        }
    }//GEN-LAST:event_chkInformeAutoActionPerformed

    private void chkFechaInformeAutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkFechaInformeAutoActionPerformed
        if(this.chkFechaInformeAuto.isSelected())
        {
            this.jPanelBuscarTodasLasGarantiasAutomotriz.setVisible(false);
            pnlIngreseRutGarante8.setVisible(false);
            pnlIngreseRutGarante16.setVisible(true);
        }
    }//GEN-LAST:event_chkFechaInformeAutoActionPerformed

    private void chkRutInfoWarraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkRutInfoWarraActionPerformed
        if(this.chkRutInfoWarra.isSelected())
        {
            pnlIngreseRutGarante7.setVisible(true);
            pnlIngreseRutGarante15.setVisible(false);
            jPanelBuscarTodasLasGarantiasWarrant.setVisible(false);
        }
    }//GEN-LAST:event_chkRutInfoWarraActionPerformed

    private void chkFechaInformeWarraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkFechaInformeWarraActionPerformed
        if(this.chkFechaInformeWarra.isSelected())
        {
            jPanelBuscarTodasLasGarantiasWarrant.setVisible(false);
            pnlIngreseRutGarante7.setVisible(false);
            pnlIngreseRutGarante15.setVisible(true);
        }
    }//GEN-LAST:event_chkFechaInformeWarraActionPerformed

    private void chkRutInformeCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkRutInformeCDPActionPerformed
        if(this.chkRutInformeCDP.isSelected())
        {
            pnlIngreseRutGarante6.setVisible(true);
            pnlIngreseRutGarante14.setVisible(false);
            jPanelBuscarTodasLasGarantiasCDP.setVisible(false);
        }
    }//GEN-LAST:event_chkRutInformeCDPActionPerformed

    private void chkFechaInformeCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkFechaInformeCDPActionPerformed
        if(this.chkFechaInformeCDP.isSelected())
        {
            pnlIngreseRutGarante6.setVisible(false);
            jPanelBuscarTodasLasGarantiasCDP.setVisible(false);
            pnlIngreseRutGarante14.setVisible(true);
            
        }
    }//GEN-LAST:event_chkFechaInformeCDPActionPerformed

    private void chkBuscarTodasLasGarantiasHipotecariasActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkBuscarTodasLasGarantiasHipotecariasActionPerformed
        if(this.chkBuscarTodasLasGarantiasHipotecarias.isSelected())
        {
            jPanelBuscarTodasHipotecarias.setVisible(true);
            pnlIngreseRutGarante17.setVisible(false);
            pnlIngreseRutGarante.setVisible(false);
        }
    }//GEN-LAST:event_chkBuscarTodasLasGarantiasHipotecariasActionPerformed

    private void btnBuscarTodasLasGarantiasHipotecariaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarTodasLasGarantiasHipotecariaActionPerformed
            this.txtRutInforme.setText(null);
            this.jcDesdeInforme.setCalendar(null);
            this.jcHastaInforme.setCalendar(null);
            try
            {   
        ArrayList<garantiaHipotecariaDTO> salida = garaHipo.ListarTodoHipo();
         if(salida.isEmpty())
         {
             javax.swing.JOptionPane.showMessageDialog(this, "Ingrese Fechas validas");
            DefaultTableModel modelo = (DefaultTableModel)this.jTInformeHipo.getModel();
            modelo.setNumRows(0);
            this.txtRutInforme.setText(null);
            this.jcDesdeInforme.setCalendar(null);
            this.jcHastaInforme.setCalendar(null);
         }
         else
         {
             DefaultTableModel modelo = (DefaultTableModel)jTInformeHipo.getModel();
             for(garantiaHipotecariaDTO x: salida)
             {
                 Object[] arr = {
                      x.getFolio_garantia_hipo(),
                   x.getRut_gara_hipo(),
                   x.getApell_paterno_hipo(),
                   x.getApell_materno_hipo(),
                   x.getNombre_hipo(),   
                   x.getSucursal_hipo(),
                   x.getCobertura_hipo(),
                   x.getSuperficie_hipo(),
                   x.getRegistro_cbr_hipo(),
                   x.getRol_sii_hipo(),
                   x.getFech_crea_hipo(),
                   x.getMoneda_hipo(),
                   x.getTipo_construccion_hipo(),
                   x.getComuna_hipo(),
                   x.getEstado_constrib_hipo(),
                   x.getMts_construidos_hipo(),
                   x.getFech_extincion_hipo(),
                   x.getEstado_hipo()
                 };
                 
                 modelo.addRow(arr);
             }
         }}catch(Exception e)
         {
             e.getMessage();
         }
    }//GEN-LAST:event_btnBuscarTodasLasGarantiasHipotecariaActionPerformed

    private void chkBuscarTodasLasGarantiasAutomotrizActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkBuscarTodasLasGarantiasAutomotrizActionPerformed
        if(this.chkBuscarTodasLasGarantiasAutomotriz.isSelected())
        {
            this.jPanelBuscarTodasLasGarantiasAutomotriz.setVisible(true);
            this.pnlIngreseRutGarante16.setVisible(false);
            this.pnlIngreseRutGarante8.setVisible(false);
        }
    }//GEN-LAST:event_chkBuscarTodasLasGarantiasAutomotrizActionPerformed

    private void btnBuscarTodasLasGarantiasAutomotrizActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarTodasLasGarantiasAutomotrizActionPerformed
             txtRutInformeAuto.setText(null);
             jcDesdeInformeAuto.setCalendar(null);
             jcHastaInformeAuto.setCalendar(null);
             try
             {
        ArrayList<garantiaAutomotrizDTO> lista = garaAuto.ListarTodoAuto();
        if(lista.isEmpty())
        {
           javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
        DefaultTableModel modelo = (DefaultTableModel)this.jTInformeAuto.getModel();
           modelo.setNumRows(0);
           txtRutInformeAuto.setText(null);
             jcDesdeInformeAuto.setCalendar(null);
             jcHastaInformeAuto.setCalendar(null);
        }
       else{
           DefaultTableModel modelo = (DefaultTableModel)this.jTInformeAuto.getModel();
           modelo.setNumRows(0);
           for(garantiaAutomotrizDTO x: lista)
           {
               Object[]arr={
                   x.getFolio_garantia_auto(),
                   x.getRut_gara_auto(),
                   x.getApell_paterno_auto(),
                   x.getApell_materno_auto(),
                   x.getNombre_auto(),
                   x.getSucursal_auto(),
                   x.getMarca_auto(),
                   x.getPatente_auto(),
                   x.getNum_chasis_auto(),
                   x.getFech_crea_auto(),
                   x.getMoneda_auto(),
                   x.getNum_motor_auto(),
                   x.getModelo_auto(),
                   x.getNum_reg_prenda_auto(),
                   x.getFech_extincion_auto(),
                   x.getEstado_auto()
               };
               modelo.addRow(arr);
           }}}catch(Exception e)
           {
               e.getMessage();
           }
    }//GEN-LAST:event_btnBuscarTodasLasGarantiasAutomotrizActionPerformed

    private void chkBuscarTodasLasGarantiasWarrantActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkBuscarTodasLasGarantiasWarrantActionPerformed
        if(this.chkBuscarTodasLasGarantiasWarrant.isSelected())
        {
            this.jPanelBuscarTodasLasGarantiasWarrant.setVisible(true);
            pnlIngreseRutGarante15.setVisible(false);
            pnlIngreseRutGarante7.setVisible(false);
        }
    }//GEN-LAST:event_chkBuscarTodasLasGarantiasWarrantActionPerformed

    private void btnBuscarTodasLasGarantiasWarrantActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarTodasLasGarantiasWarrantActionPerformed
         this.txtRutInformeWarra.setText(null);
         this.jcDesdeInformeWarra.setCalendar(null);
         this.jcHastaInformeWarra.setCalendar(null);
        try
         {
        ArrayList<garantiaWarrantsDTO> lista = garaWarra.ListarTodoWarra();
        if(lista.isEmpty())
        {
           javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
           DefaultTableModel modelo = (DefaultTableModel)this.jTInformeWarra.getModel();
           modelo.setNumRows(0);
           this.txtRutInformeWarra.setText(null);
           this.jcDesdeInformeWarra.setCalendar(null);
           this.jcHastaInformeWarra.setCalendar(null);
        }
       else{
           DefaultTableModel modelo = (DefaultTableModel)this.jTInformeWarra.getModel();
           modelo.setNumRows(0);
           for(garantiaWarrantsDTO x: lista)
           {
               Object[]arr={
                   x.getFolio_warra(),
                   x.getRut_garante_warra(),
                   x.getApell_paterno_warra(),
                   x.getApell_materno_warra(),
                   x.getNombre_warra(),
                   x.getNom_sucursal_warra(),
                   x.getTipo_prod_warra(),
                   x.getIngre_prod_warra(),
                   x.getNom_moneda_warra(),
                   x.getFech_exti_warra(),
                   x.getEstado_warra()
               };
               modelo.addRow(arr);
           }
       }
         }catch(Exception e)
         {
             e.getMessage();
         }
    }//GEN-LAST:event_btnBuscarTodasLasGarantiasWarrantActionPerformed

    private void chkBuscarTodasLasGarantiasCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_chkBuscarTodasLasGarantiasCDPActionPerformed
        if(chkBuscarTodasLasGarantiasCDP.isSelected())
        {
            jPanelBuscarTodasLasGarantiasCDP.setVisible(true);
            pnlIngreseRutGarante14.setVisible(false);
            pnlIngreseRutGarante6.setVisible(false);
        }
    }//GEN-LAST:event_chkBuscarTodasLasGarantiasCDPActionPerformed

    private void btnBuscarTodasLasGarantiasCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnBuscarTodasLasGarantiasCDPActionPerformed
        jcDesdeInformeCDP.setCalendar(null);
        jcHastaInformeCDP.setCalendar(null);
        txtRutInformeCDP.setText(null);
        ArrayList<garantiaCdpOtrosDTO> lista = garaCdp.ListarTodoCdp();
        if(lista.isEmpty())
        {
           javax.swing.JOptionPane.showMessageDialog(this, "No hay garantias registradas!");
           DefaultTableModel modelo = (DefaultTableModel)this.jtableInformeCdp.getModel();
           modelo.setNumRows(0);
           jcDesdeInformeCDP.setCalendar(null);
           jcHastaInformeCDP.setCalendar(null);
           txtRutInformeCDP.setText(null);
        }
       else{
           DefaultTableModel modelo = (DefaultTableModel)this.jtableInformeCdp.getModel();
           modelo.setNumRows(0);
           for(garantiaCdpOtrosDTO x: lista)
           {
               Object[]arr={
                   x.getFolio_cdp(),
                   x.getRut_gara_cdp(),
                   x.getApell_paterno_cdp(),
                   x.getApell_materno_cdp(),
                   x.getNombre_cdp(),
                   x.getSucu_cdp(),
                   x.getFech_crea_cdp(),
                   x.getNom_moneda_cdp(),
                   x.getFech_extin_cdp(),
                   x.getEstado_cdp()
                   };
               modelo.addRow(arr);
           }
       }
    }//GEN-LAST:event_btnBuscarTodasLasGarantiasCDPActionPerformed

    private void btnInformeGarantiasHipoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnInformeGarantiasHipoActionPerformed
        try {
            
        int fila= 0;
  
        List Resultados = new ArrayList();
        ReporteInformeTotalGarantiaDTO tipo;
        Resultados.clear();
        
        for(fila = 0; fila< jTInformeHipo.getRowCount(); fila++)
        {
            
           tipo = new ReporteInformeTotalGarantiaDTO(
                          String.valueOf(jTInformeHipo.getValueAt(fila, 0)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 1)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 2)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 3)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 4)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 5)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 6)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 7)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 8)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 9)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 10)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 11)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 12)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 13)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 14)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 15)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 16)),
                   " " +  String.valueOf(jTInformeHipo.getValueAt(fila, 17)) + "\n");
           Resultados.add(tipo);

        }
        
            String reportSource = "C:\\Users\\SoftGroup\\Documents\\NetBeansProjects\\trunk\\AppGarantias\\build\\classes\\Reporte\\ReporteInformeGarantia.jrxml";

            JasperReport jr = JasperCompileManager.compileReport(reportSource);
            
            
            JFrame reporte = new JFrame();
            reporte.setSize(900, 700);
            
            reporte.setLocationRelativeTo(null);
            reporte.setTitle("IMPRESIÓN");
            String fechaImpresion = String.valueOf(Fechas.FechaSistema());
            
            Map<String, Object> map = new HashMap<String, Object>();
            
            map.put("Titulo", "Sistema Gestión de Garantías Bancarias");
            map.put("subtitulo", "Informe Garantías Hipotecarias");
            map.put("fecha", fechaImpresion);
            map.put("nombreBanco", "Banco xxxxxx");
            
            
            JRBeanCollectionDataSource coleccion = new JRBeanCollectionDataSource(Resultados);
            JasperPrint jp = JasperFillManager.fillReport(jr, map, coleccion);
            JRViewer jv = new JRViewer(jp);
            reporte.getContentPane().add(jv);
            reporte.setVisible(true);
            
            
            
        } catch (JRException e) {
            e.printStackTrace();
            Logger.getLogger(InformeTotalGtia.class.getName()).log(Level.SEVERE, null, e);
        }
    }//GEN-LAST:event_btnInformeGarantiasHipoActionPerformed

    private void btnImprimirInformeGarantiaAutoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirInformeGarantiaAutoActionPerformed
         try {
            
        int fila= 0;
  
        List Resultados = new ArrayList();
        ReporteInformeTotalGarantiaAutoDTO tipo;
        Resultados.clear();
        
        for(fila = 0; fila< jTInformeAuto.getRowCount(); fila++)
        {
            
           tipo = new ReporteInformeTotalGarantiaAutoDTO(
                          String.valueOf(jTInformeAuto.getValueAt(fila, 0)),
                   " " +  String.valueOf(jTInformeAuto.getValueAt(fila, 1)),
                   " " +  String.valueOf(jTInformeAuto.getValueAt(fila, 2)),
                   " " +  String.valueOf(jTInformeAuto.getValueAt(fila, 3)),
                   " " +  String.valueOf(jTInformeAuto.getValueAt(fila, 4)),
                   " " +  String.valueOf(jTInformeAuto.getValueAt(fila, 5)),
                   " " +  String.valueOf(jTInformeAuto.getValueAt(fila, 6)),
                   " " +  String.valueOf(jTInformeAuto.getValueAt(fila, 7)),
                   " " +  String.valueOf(jTInformeAuto.getValueAt(fila, 8)),
                   " " +  String.valueOf(jTInformeAuto.getValueAt(fila, 9)),
                   " " +  String.valueOf(jTInformeAuto.getValueAt(fila, 10)),
                   " " +  String.valueOf(jTInformeAuto.getValueAt(fila, 11)),
                   " " +  String.valueOf(jTInformeAuto.getValueAt(fila, 12)),
                   " " +  String.valueOf(jTInformeAuto.getValueAt(fila, 13)),
                   " " +  String.valueOf(jTInformeAuto.getValueAt(fila, 14)),
                   " " +  String.valueOf(jTInformeAuto.getValueAt(fila, 15)) + "\n");
           Resultados.add(tipo);

        }
        
            String reportSource = "C:\\Users\\SoftGroup\\Documents\\NetBeansProjects\\trunk\\AppGarantias\\build\\classes\\Reporte\\ReporteInformeGarantiaAutomotriz.jrxml";

            JasperReport jr = JasperCompileManager.compileReport(reportSource);
            
            
            JFrame reporte = new JFrame();
            reporte.setSize(900, 700);
            
            reporte.setLocationRelativeTo(null);
            reporte.setTitle("IMPRESIÓN");
            String fechaImpresion = String.valueOf(Fechas.FechaSistema());
            
            Map<String, Object> map = new HashMap<String, Object>();
            
            map.put("Titulo", "Sistema Gestión de Garantías Bancarias");
            map.put("subtitulo", "Informe Garantías Automotriz");
            map.put("fecha", fechaImpresion);
            map.put("nombreBanco", "Banco xxxxxx");
            
            
            JRBeanCollectionDataSource coleccion = new JRBeanCollectionDataSource(Resultados);
            JasperPrint jp = JasperFillManager.fillReport(jr, map, coleccion);
            JRViewer jv = new JRViewer(jp);
            reporte.getContentPane().add(jv);
            reporte.setVisible(true);
            
            
            
        } catch (JRException e) {
            e.printStackTrace();
            Logger.getLogger(InformeTotalGtia.class.getName()).log(Level.SEVERE, null, e);
        }
    }//GEN-LAST:event_btnImprimirInformeGarantiaAutoActionPerformed

    private void btnImprimirInformeGarantiaWarraActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirInformeGarantiaWarraActionPerformed
        try {
            
        int fila= 0;
  
        List Resultados = new ArrayList();
        ReporteInformeTotalGarantiaWarrantDTO tipo;
        Resultados.clear();
        
        for(fila = 0; fila< jTInformeWarra.getRowCount(); fila++)
        {
            
           tipo = new ReporteInformeTotalGarantiaWarrantDTO(
                          String.valueOf(jTInformeWarra.getValueAt(fila, 0)),
                   " " +  String.valueOf(jTInformeWarra.getValueAt(fila, 1)),
                   " " +  String.valueOf(jTInformeWarra.getValueAt(fila, 2)),
                   " " +  String.valueOf(jTInformeWarra.getValueAt(fila, 3)),
                   " " +  String.valueOf(jTInformeWarra.getValueAt(fila, 4)),
                   " " +  String.valueOf(jTInformeWarra.getValueAt(fila, 5)),
                   " " +  String.valueOf(jTInformeWarra.getValueAt(fila, 6)),
                   " " +  String.valueOf(jTInformeWarra.getValueAt(fila, 7)),
                   " " +  String.valueOf(jTInformeWarra.getValueAt(fila, 8)),
                   " " +  String.valueOf(jTInformeWarra.getValueAt(fila, 9)),
                   " " +  String.valueOf(jTInformeWarra.getValueAt(fila, 10)) + "\n");
           Resultados.add(tipo);

        }
        
            String reportSource = "C:\\Users\\SoftGroup\\Documents\\NetBeansProjects\\trunk\\AppGarantias\\build\\classes\\Reporte\\ReporteInformeGarantiaWarrant.jrxml";

            JasperReport jr = JasperCompileManager.compileReport(reportSource);
            
            
            JFrame reporte = new JFrame();
            reporte.setSize(900, 700);
            
            reporte.setLocationRelativeTo(null);
            reporte.setTitle("IMPRESIÓN");
            String fechaImpresion = String.valueOf(Fechas.FechaSistema());
            
            Map<String, Object> map = new HashMap<String, Object>();
            
            map.put("Titulo", "Sistema Gestión de Garantías Bancarias");
            map.put("subtitulo", "Informe Garantías Warrant");
            map.put("fecha", fechaImpresion);
            map.put("nombreBanco", "Banco xxxxxx");
            
            
            JRBeanCollectionDataSource coleccion = new JRBeanCollectionDataSource(Resultados);
            JasperPrint jp = JasperFillManager.fillReport(jr, map, coleccion);
            JRViewer jv = new JRViewer(jp);
            reporte.getContentPane().add(jv);
            reporte.setVisible(true);
            
            
            
        } catch (JRException e) {
            e.printStackTrace();
            Logger.getLogger(InformeTotalGtia.class.getName()).log(Level.SEVERE, null, e);
        }
    }//GEN-LAST:event_btnImprimirInformeGarantiaWarraActionPerformed

    private void btnImprimirInformeGarantiaCDPActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnImprimirInformeGarantiaCDPActionPerformed
       try {
            
        int fila= 0;
  
        List Resultados = new ArrayList();
        ReporteInformeTotalGarantiaCDPDTO tipo;
        Resultados.clear();
        
        for(fila = 0; fila< jtableInformeCdp.getRowCount(); fila++)
        {
            
           tipo = new ReporteInformeTotalGarantiaCDPDTO(
                          String.valueOf(jtableInformeCdp.getValueAt(fila, 0)),
                   " " +  String.valueOf(jtableInformeCdp.getValueAt(fila, 1)),
                   " " +  String.valueOf(jtableInformeCdp.getValueAt(fila, 2)),
                   " " +  String.valueOf(jtableInformeCdp.getValueAt(fila, 3)),
                   " " +  String.valueOf(jtableInformeCdp.getValueAt(fila, 4)),
                   " " +  String.valueOf(jtableInformeCdp.getValueAt(fila, 5)),
                   " " +  String.valueOf(jtableInformeCdp.getValueAt(fila, 6)),
                   " " +  String.valueOf(jtableInformeCdp.getValueAt(fila, 7)),
                   " " +  String.valueOf(jtableInformeCdp.getValueAt(fila, 8)),
                   " " +  String.valueOf(jtableInformeCdp.getValueAt(fila, 9)) + "\n");
           Resultados.add(tipo);

        }
        
            String reportSource = "C:\\Users\\SoftGroup\\Documents\\NetBeansProjects\\trunk\\AppGarantias\\build\\classes\\Reporte\\ReporteInformeGarantiaCDP.jrxml";

            JasperReport jr = JasperCompileManager.compileReport(reportSource);
            
            
            JFrame reporte = new JFrame();
            reporte.setSize(900, 700);
            
            reporte.setLocationRelativeTo(null);
            reporte.setTitle("IMPRESIÓN");
            String fechaImpresion = String.valueOf(Fechas.FechaSistema());
            
            Map<String, Object> map = new HashMap<String, Object>();
            
            map.put("Titulo", "Sistema Gestión de Garantías Bancarias");
            map.put("subtitulo", "Informe Garantías CDP");
            map.put("fecha", fechaImpresion);
            map.put("nombreBanco", "Banco xxxxxx");
            
            
            JRBeanCollectionDataSource coleccion = new JRBeanCollectionDataSource(Resultados);
            JasperPrint jp = JasperFillManager.fillReport(jr, map, coleccion);
            JRViewer jv = new JRViewer(jp);
            reporte.getContentPane().add(jv);
            reporte.setVisible(true);
            
            
            
        } catch (JRException e) {
            e.printStackTrace();
            Logger.getLogger(InformeTotalGtia.class.getName()).log(Level.SEVERE, null, e);
        }
    }//GEN-LAST:event_btnImprimirInformeGarantiaCDPActionPerformed

    /**
     * @param args the command line arguments
     */
//    public static void main(String args[]) {
//        /*
//         * Set the Nimbus look and feel
//         */
//        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
//        /*
//         * If Nimbus (introduced in Java SE 6) is not available, stay with the
//         * default look and feel. For details see
//         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
//         */
//        try {
//            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
//                if ("Nimbus".equals(info.getName())) {
//                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
//                    break;
//                }
//            }
//        } catch (ClassNotFoundException ex) {
//            java.util.logging.Logger.getLogger(InformeTotalGtia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (InstantiationException ex) {
//            java.util.logging.Logger.getLogger(InformeTotalGtia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (IllegalAccessException ex) {
//            java.util.logging.Logger.getLogger(InformeTotalGtia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
//            java.util.logging.Logger.getLogger(InformeTotalGtia.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
//        }
//        //</editor-fold>
//
//        /*
//         * Create and display the form
//         */
//        java.awt.EventQueue.invokeLater(new Runnable() {
//
//            public void run() {
//                new InformeTotalGtia().setVisible(true);
//            }
//        });
//    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnBuscarRutAuto;
    private javax.swing.JButton btnBuscarTodasLasGarantiasAutomotriz;
    private javax.swing.JButton btnBuscarTodasLasGarantiasCDP;
    private javax.swing.JButton btnBuscarTodasLasGarantiasHipotecaria;
    private javax.swing.JButton btnBuscarTodasLasGarantiasWarrant;
    private javax.swing.JButton btnFechaInforme;
    private javax.swing.JButton btnFechaInformeAuto;
    private javax.swing.JButton btnFechaInformeCDP;
    private javax.swing.JButton btnFechaInformeWarra;
    private javax.swing.JButton btnImprimirInformeGarantiaAuto;
    private javax.swing.JButton btnImprimirInformeGarantiaCDP;
    private javax.swing.JButton btnImprimirInformeGarantiaWarra;
    private javax.swing.JButton btnInformeGarantiasHipo;
    private javax.swing.JButton btnRutInforme;
    private javax.swing.JButton btnRutInformeCDP;
    private javax.swing.JButton btnRutInformeWarra;
    private javax.swing.JButton btnVolv;
    private javax.swing.JButton btnVolver1;
    private javax.swing.JButton btnVolver2;
    private javax.swing.JButton btnVolver3;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.ButtonGroup buttonGroup3;
    private javax.swing.ButtonGroup buttonGroup4;
    private javax.swing.JCheckBox chkBuscarTodasLasGarantiasAutomotriz;
    private javax.swing.JCheckBox chkBuscarTodasLasGarantiasCDP;
    private javax.swing.JCheckBox chkBuscarTodasLasGarantiasHipotecarias;
    private javax.swing.JCheckBox chkBuscarTodasLasGarantiasWarrant;
    private javax.swing.JCheckBox chkFechaInforme;
    private javax.swing.JCheckBox chkFechaInformeAuto;
    private javax.swing.JCheckBox chkFechaInformeCDP;
    private javax.swing.JCheckBox chkFechaInformeWarra;
    private javax.swing.JCheckBox chkInformeAuto;
    private javax.swing.JCheckBox chkRutInfoWarra;
    private javax.swing.JCheckBox chkRutInforme;
    private javax.swing.JCheckBox chkRutInformeCDP;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel38;
    private javax.swing.JLabel jLabel39;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel40;
    private javax.swing.JLabel jLabel41;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JPanel jPanelBuscarTodasHipotecarias;
    private javax.swing.JPanel jPanelBuscarTodasLasGarantiasAutomotriz;
    private javax.swing.JPanel jPanelBuscarTodasLasGarantiasCDP;
    private javax.swing.JPanel jPanelBuscarTodasLasGarantiasWarrant;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane12;
    private javax.swing.JScrollPane jScrollPane13;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JTable jTInformeAuto;
    private javax.swing.JTable jTInformeHipo;
    private javax.swing.JTable jTInformeWarra;
    private javax.swing.JTabbedPane jTabbedPane2;
    private com.toedter.calendar.JDateChooser jcDesdeInforme;
    private com.toedter.calendar.JDateChooser jcDesdeInformeAuto;
    private com.toedter.calendar.JDateChooser jcDesdeInformeCDP;
    private com.toedter.calendar.JDateChooser jcDesdeInformeWarra;
    private com.toedter.calendar.JDateChooser jcHastaInforme;
    private com.toedter.calendar.JDateChooser jcHastaInformeAuto;
    private com.toedter.calendar.JDateChooser jcHastaInformeCDP;
    private com.toedter.calendar.JDateChooser jcHastaInformeWarra;
    private javax.swing.JTable jtableInformeCdp;
    private javax.swing.JPanel pnlIngreseRutGarante;
    private javax.swing.JPanel pnlIngreseRutGarante14;
    private javax.swing.JPanel pnlIngreseRutGarante15;
    private javax.swing.JPanel pnlIngreseRutGarante16;
    private javax.swing.JPanel pnlIngreseRutGarante17;
    private javax.swing.JPanel pnlIngreseRutGarante6;
    private javax.swing.JPanel pnlIngreseRutGarante7;
    private javax.swing.JPanel pnlIngreseRutGarante8;
    private javax.swing.JTextField txtRutInforme;
    private javax.swing.JTextField txtRutInformeAuto;
    private javax.swing.JTextField txtRutInformeCDP;
    private javax.swing.JTextField txtRutInformeWarra;
    // End of variables declaration//GEN-END:variables
}
